package pkg

import (
	"dubbo-go-app/pkg/handler"
	"dubbo-go-app/pkg/initialize"
	start "dubbo.apache.org/dubbo-go/v3/config"
	_ "dubbo.apache.org/dubbo-go/v3/imports"
)

func Start() {
	//初始化日志
	initialize.InitLogger()
	//初始化配置
	initialize.InitConfig()
	//初始化数据库
	initialize.InitDB()

	//注册服务
	start.SetProviderService(&handler.GreeterServer{})
	if err := start.Load(); err != nil {
		panic(err)
	}
	select {}
}
